#ifndef __DATA_STRUCT_H__
#define __DATA_STRUCT_H__

typedef void(*pri)(const void *);

typedef struct seqlist{
	void *arr;
	int size;
	int nmemb;
	int capacity;
}seqlist_t;

int seqlist_init(seqlist_t **mylist, int size, int capacity);

int seqlist_isfull(const seqlist_t *mylist);

int seqlist_empty(const seqlist_t *mylist);

int seqlist_insert(seqlist_t *mylist, const void *newdata);

int seqlist_delete(seqlist_t *mylist, const void *key, int(*cmp)(const void *data, const void *key));

int seqlist_update(const seqlist_t *mylist, const void *key, int(*cmp)(const void *data, const void *key), const void *newdata);

void *seqlist_search(const seqlist_t *mylist, const void *key, int(*cmp)(const void *data, const void *key));

void seqlist_traval(const seqlist_t *mylist, void(*pri)(const void *));

void seqlist_destroy(seqlist_t **mylist);


#endif
